home *** CD-ROM | disk | FTP | other *** search
- ;
- ; NOTE: A quick-reference summary of POM commands appears in QUICKREF.POM
- ;
- ;-------------------------------------------------------------------------------
- ;
- ; Restrict the lines we'll accept
- ;
- ACCEPT $FLINE[58 60] = "IBM"
- ACCEPT $FLINE[58 60] = "MAC"
- ;
- ; Pad out description, with spaces, to 40 characters
- ; We'll also modify the string -PC to read -IBMPC
- ; Note the trailing space after PC to ensure it's at the end of the string
- ;
- SET descrip = $FLINE[19 49]
- INSERT descrip "<PC " "IBM"
- PAD descrip "R" " " "40"
- ;
- ; Make quantity only 2 characters wide (maximum would therefore be 99)
- ;
- SET qty = $FLINE[63 66]
- TRIM qty "A" " "
- PAD qty "L" " " "2"
- ;
- ; Take only the last three digits of the invoice number
- ;
- SET inv = $FLINE[14 16]
- ;
- ; Detect minus sign and set price accordingly
- ;
- SET price = $FLINE[70 76]
- TRIM price "A" " "
- IF $FLINE[77] = "-" THEN minus = "-" ELSE ""
- INSERT price "L" minus
- PAD price "L" " " "7"
- INSERT price "L" "$"
- ;
- ; Set other fields; note use of uppercase version of $FLINE ($FLUPC) for type
- ;
- SET itemnum = $FLINE[01 07]
- SET type = $FLUPC[51 55]
- SET cat = $FLINE[58 60]
- ;
- ; Set output as follows:
- ; Invoice, Item, Type (in uppercase), Category
- ; Description, Quantity, Unit price
- ;
- OUT |{inv} {itemnum} {type} {cat}
- OUTEND | {descrip} {qty} {price}
-